#pragma once

#include "Room.h"
#include "PlayerObj.h"
#include <hgeanim.h>
#include "EnermyObj.h"
#include "BossObj.h"

class GameRoom : public Room
{
public:
	GameRoom(const char* resName);
	virtual ~GameRoom();
	virtual bool FrameFunc();
	virtual bool RenderFunc();
	void AddGameObj(GameObj* obj);
	void DelGameObj(int num);
	void DelGameObj(GameObj* obj);
	static float getLiveTime(){return m_livetime;};
	static float getPlayerX(){return m_pToDev->m_player->getX();}
	static float getPlayerY(){return m_pToDev->m_player->getY();}
	static void Boom();
	static void setGameOver();
	static bool isGameOver();
	//to be done

private:
	hgeResourceManager *m_Res;
	PlayerObj *m_player;
	std::vector<GameObj*> m_GameLayer;//save Enermy
	inline void ClearAll();
	int m_iEnermy,m_score;
	static float m_livetime;
	EnermyObj* m_pickedEnermy;
	EnermyObj* pickEnermy();
	static GameRoom* m_pToDev;
	HCHANNEL m_musicPlayer;
	bool m_isGameover;
};